package com.gw.vip.center.service.dao_service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gw.vip.center.dao.IssuInfoMapper;
import com.gw.vip.center.po.IssuInfo;
import org.springframework.stereotype.Service;

/**
 * @author GW
 * @description
 * @since 2022-04-25
 */
@Service
public class IssuInfoService extends ServiceImpl<IssuInfoMapper, IssuInfo> {
    /**
     * 根据userId获取发行机构信息
     * @param userId
     * @return
     */
    public IssuInfo getByUser(String userId) {
        QueryWrapper<IssuInfo> queryWrapper = new QueryWrapper<>();
        queryWrapper.lambda().eq(IssuInfo::getUserId, userId);
        return getOne(queryWrapper);
    }
}
